<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,viewport-fit=cover" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>有关HTML5页面在iPhoneX适配问题-纯色</title>
        <style>
            * {
               padding: 0;
               margin: 0;        
           }        
           body {
               background:green;
               padding-top: constant(safe-area-inset-top); /* 88px */            
               /*padding-left: constant(safe-area-inset-left);*/            
               /*padding-right: constant(safe-area-inset-right);*/            
               /*padding-bottom: constant(safe-area-inset-bottom);*/        
           }
        </style>
    </head>
    <body>
        <h1>有关HTML5页面在iPhoneX适配问题</h1>
        <p>来源:<a href="http://www.jb51.net/html5/586439.html">http://www.jb51.net/html5/586439.html</a></p>
        <div class="content">this is subElement</div>
    </body>
</html>